package com.jia.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 *
 * @TableName t_user_ecards
 */
@TableName(value ="t_user_ecards")
@Data
public class UserEcards implements Serializable {
    /**
     * 点卡-用户中间表
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 电卡外键
     */
    @TableField(value = "eid")
    private Integer eid;

    /**
     * 用户外键
     */
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 有效期
     */
    @TableField(value = "endtime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endtime;

    /**
     * 绑定日期
     */
    @TableField(value = "starttime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date starttime;

    /**
     * 剩余可用次数
     */
    @TableField(value = "hascount")
    private Integer hascount;

    /**
     * 状态:0正常 1：挂失中
     */
    @TableField(value = "state")
    private String state;

    /**
     * 冗余
     */
    @TableField(value = "r")
    private String r;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
